package work.timejay.user.entity.books;

import work.timejay.common.SuperModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 用户书本表
 * </p>
 *
 * @author 王文杰
 * @since 2023-11-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("user_books")
public class UserBooks extends SuperModel<UserBooks> {

    private static final long serialVersionUID = 1L;

    /**
     * 书本id
     */
    @TableField("book_id")
    private Long bookId;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 书本分类
     */
    @TableField("book_type")
    private Long bookType;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 作者
     */
    @TableField("author")
    private String author;

    /**
     * 书本文件路径
     */
    @TableField("book_path")
    private String bookPath;

    /**
     * 封面图片
     */
    @TableField("cover_path")
    private String coverPath;

    /**
     * 价格
     */
    @TableField("price")
    private String price;

    /**
     * 0 不收费 1 收费
     */
    @TableField("price_status")
    private Boolean priceStatus;

    /**
     * 1 点赞 0 未点赞
     */
    @TableField("give_status")
    private Boolean giveStatus;

    /**
     * 1 收藏 0 未收藏
     */
    @TableField("like_status")
    private Boolean likeStatus;

    /**
     * 1 支付  0 未支付
     */
    @TableField("pay_status")
    private Boolean payStatus;

    /**
     * 1 更新 0 未更新
     */
    @TableField("update_status")
    private Boolean updateStatus;

    /**
     * 读取id
     */
    @TableField("read_id")
    private Long readId;

    /**
     * 0 系统书籍  1 用户书籍
     */
    @TableField("type")
    private Boolean type;


    public static final String BOOK_ID = "book_id";

    public static final String USER_ID = "user_id";

    public static final String BOOK_TYPE = "book_type";

    public static final String TITLE = "title";

    public static final String AUTHOR = "author";

    public static final String BOOK_PATH = "book_path";

    public static final String COVER_PATH = "cover_path";

    public static final String PRICE = "price";

    public static final String PRICE_STATUS = "price_status";

    public static final String GIVE_STATUS = "give_status";

    public static final String LIKE_STATUS = "like_status";

    public static final String PAY_STATUS = "pay_status";

    public static final String UPDATE_STATUS = "update_status";

    public static final String READ_ID = "read_id";

    public static final String TYPE = "type";

    @Override
    protected Serializable pkVal() {
        return null;
    }

}
